
<template>
  <div>
    <h1 >猜猜我是谁</h1>
    <div>{{count}}</div>
      <button @click="add">点击</button>
  </div>
</template>

<script>
export default {
    name:"Count",
    props:['num'],
    data() {
    return {
      count: 0,
    };
  },
  methods: {
    add() {
      this.count+=this.num;
      console.log(this);
    },
  },
  computed:{
    newNum(){
      return this.num+1
    }
  }
}
</script>

<style>

</style>